/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tpdisenio2009.services;

import java.util.List;
import tpdisenio2009.model.beans.RealTeam;
import tpdisenio2009.model.dao.RealTeamDAO;

/**
 *
 * @author Pablito
 */
public class RealTeamService {

   private final RealTeamDAO realTeamDAO;
    public RealTeamService() {
        realTeamDAO = new RealTeamDAO();
    }

    public List<RealTeam> getRealTeams() {
        return realTeamDAO.getAll();
    }

    public boolean existRealTeamName( String name ) {
        List<RealTeam> clubes = realTeamDAO.getRealTeamsByName( name );
         if ( clubes.isEmpty() ) {
             return false;
         } else {
            return true;
         }
    }
}
